The present invention relates to a monitoring apparatus using an image pickup apparatus, and particularly relates to an intruding object detecting method and an intruding object detecting apparatus in which an object intruding into the field of view for image pickup is automatically detected from a video signal supplied from an image pickup device under the monitoring environment where shadows of trees, flags, or the like, are observed trembling.
An intruding object detecting apparatus using an image pickup apparatus such as a camera or the like as image input means is designed not to provide conventional manned monitoring which depends on a human monitor, but to detect an object intruding into the field of view to be monitored or to recognize the kind of the object so as to obtain predetermined information or warning measures automatically. To realize such a system, there is a method in which an input image obtained by image input means such as a camera or the like is first compared with a reference background image (that is, an image in which no object to be detected is picked up), and a difference in luminance value between the input image and the reference background image is obtained for every pixel. Thus, an area where the difference is large is extracted as an object. Such a method, called a subtraction method, has been hitherto used widely.
There is another object detecting method in the application of such a subtraction method, for example, as disclosed in JP-A-7-79429. In this method, however, there is a problem that not only intruding objects to be detected but also moving objects such as trees or flags trembling in the wind, shadows of those, or the like, may be extracted due to detection of the difference in luminance value between an input image and a reference background image for every pixel. In order to solve such a problem, JP-A-10-283466 discloses a method in which areas where moving objects other than intruding objects to be detected exist are specified, and the specified areas are subjected to a masking processing (masked as insensible areas) so that only the intruding objects are extracted.
In the aforementioned background art, however, there is a disadvantage that it is necessary to establish masked areas (insensible areas) where there are moving objects other than intruding objects to be detected so that such moving objects can be prevented from being detected erroneously. Particularly, when such moving objects other than intruding objects to be detected are shadows of trees, flags, or the like, trembling in the wind, these moving objects change their positions from moment to moment. Therefore, in order to prevent such shadows from being detected erroneously, the positions where the shadows exist must be inferred from conditions such as the season, the time zone, the position of the monitoring area (latitude, longitude, etc.), the weather, and so on. Thus, there is another disadvantage that the areas to be masked must be changed from moment to moment. Further, it is impossible to detect intruding objects which exist in the masked areas. Alternatively, in order to restrict erroneous detection (erroneous extraction) of moving objects other than intruding objects in the masked areas, a threshold value Th is required to be set high for binarization in the masked areas. However, if the threshold value is set to be high, there is a further disadvantage that intruding objects are apt to be missed. It is therefore desired that the masked areas are confined to small areas.
It is therefore an object of the present invention to eliminate the foregoing disadvantages, and to provide a reliable intruding object detecting method and a reliable intruding object detecting apparatus by which, even in the condition that there are shadows of moving objects other than target objects to be detected, judgement can be made as to whether any extracted object is an object to be detected or not, without masking the areas where the shadows exist.
In order to attain the foregoing object, an intruding object detecting method according to an aspect of the present invention comprises the steps of: supplying an image signal from an image pickup device; extracting a moving object from the supplied image signal and a reference background image signal stored in a memory device by the subtraction method; making division between the supplied image signal and the reference background image signal for every pixel so as to produce a ratio image; calculating a histogram of luminance values (pixel values) on the ratio image in the same coordinate positions as the area of each extracted object, that is, producing a histogram of a brightness change ratio; judging whether two peaks appearing in the histogram is symmetrical or not; and judging whether the extracted moving object is an intruding object or a shadow on the basis of the result of the judgement according to the first-mentioned judging step.
Preferably, in the aforementioned step of judging the symmetry of the peaks appearing in the histogram, two mean pixel values in ratio representation (xcexcxe2x80x2+, xcexcxe2x80x2xe2x88x92) are calculated on a part of the ratio image corresponding to the extracted moving object from the histogram, and an absolute value of a difference between one (xcexcxe2x80x2+) of the mean pixel values in ratio representation and the reciprocal (1/xcexcxe2x80x2xe2x88x92) of the other mean pixel value (xcexcxe2x80x2xe2x88x92) in ratio representation is compared with a predetermined threshold value; wherein the aforementioned judging step judges the extracted object to be an intruding object when the comparison result in the comparing step concludes that the absolute value of a difference between one of the mean pixel values in ratio representation and the reciprocal of the other mean pixel value in ratio representation is equal to or larger than the predetermined threshold value (T1), and the judging step judges the extracted object to be not an intruding object, for example, a shadow or the like, when the above-mentioned absolute value is smaller than the predetermined threshold value (T1). This judgement depends on the fact that, if there is a shadow of a tree, a flag, or the like, trembling in the wind, there appear a pair of an area which has turned bright because a shadow has disappeared due to the wind and an area which has turned dark because the shadow has appeared due to the wind, and the mean pixel value (xcexcxe2x80x2+) in ratio representation in pixels which have turned bright on the ratio image shows a value close to the reciprocal of the mean pixel value (xcexcxe2x80x2xe2x88x92) in ratio representation in pixels which have turned dark on the ratio image. Thus, the shadows are specified.
According to another aspect of the present invention, the step of judging the symmetry of the peaks appearing in the histogram calculates sharpnesses ("sgr"+, "sgr"xe2x88x92) of pixel value distribution on the part of the ratio image corresponding to the extracted moving object from the histogram; and compares each of the calculated sharpnesses of pixel value distribution with a predetermined threshold value. On the basis of this comparison result, the judging step judges whether the extracted object is an intruding object or not. Any pixel has a substantially fixed pixel value change ratio on the part of the ratio image corresponding to the area which has turned bright because a shadow has disappeared due to the wind. Likewise, any pixel has a substantially fixed pixel value change ratio on the part of the ratio image corresponding to the area which has turned dark because the shadow has appeared. By use of such a phenomenon, the extracted moving object is judged to be not an intruding object but a shadow.